Ext.define('Admin.view.bidding.BiddingEdit', {
	extend: 'Admin.ux.form.FormPanel',
	xtype: 'bidding-edit',
	bodyStyle: 'padding:5px 5px 5px 5px;',
	items: [{
		xtype: 'fieldset',
		title: '竞价单',
		collapsible: true,
		items: [{
			xtype: 'form',
			layout: 'column',
			items: [{
				columnWidth: 0.5,
				margin: 6,

				xtype: 'textfield',

				name: 'id',
				hidden: true

			}, {
				columnWidth: 0.5,
				margin: 6,

				xtype: 'textfield',

				name: 'name',

				fieldLabel: '竞谈名称',
				emptyText: '必填',
				labelWidth: 200,
				labelAlign: 'right',

				allowBlank: true,
				beforeLabelTextTpl: '<span style="color:red;font-weight:bold">*</span>'
			}, {
				columnWidth: 0.5,
				margin: 6,

				xtype: 'combobox',

				name: 'status',

				fieldLabel: '公告类型',
				emptyText: '必选',
				labelWidth: 200,
				labelAlign: 'right',

				store: Ext.create('Ext.data.Store', {
					fields: ['code', 'name'],
					data: [
						{ 'code': 0, 'name': '全部' },
						{ 'code': 1, 'name': '谈判公告' },
						{ 'code': 2, 'name': '谈判结果' }
					]
				}),

				queryMode: 'local',
				valueField: 'code',
				displayField: 'name',

				editable: false,
				forceSelection: true,
				allowBlank: true,
				beforeLabelTextTpl: '<span style="color:red;font-weight:bold">*</span>',
			}, {
				columnWidth: 0.5,
				margin: 6,

				xtype: 'textfield',

				name: 'sn',

				fieldLabel: '竞谈编号',
				emptyText: '必填',
				labelWidth: 200,
				labelAlign: 'right',

				allowBlank: true,
				beforeLabelTextTpl: '<span style="color:red;font-weight:bold">*</span>',


			}, {
				columnWidth: 0.5,
				margin: 6,

				xtype: 'combobox',

				name: 'plate',

				fieldLabel: '产业板块',
				emptyText: '必选',
				labelWidth: 200,
				labelAlign: 'right',

				store: Ext.create('Ext.data.Store', {
					fields: ['code', 'name'],
					data: [
						{ 'code': 1, 'name': '有效' },
						{ 'code': 0, 'name': '无效' }
					]
				}),

				queryMode: 'local',
				valueField: 'code',
				displayField: 'name',

				editable: false,
				forceSelection: true,
				allowBlank: true,
				beforeLabelTextTpl: '<span style="color:red;font-weight:bold">*</span>',


			}, {
				columnWidth: 0.5,
				margin: 6,

				xtype: 'textfield',

				name: 'tissue',

				fieldLabel: '采购组织',
				emptyText: '必填',
				labelWidth: 200,
				labelAlign: 'right',

				allowBlank: true,
				beforeLabelTextTpl: '<span style="color:red;font-weight:bold">*</span>'
			}, {
				columnWidth: 0.5,
				margin: 6,

				xtype: 'combobox',

				name: 'mode',

				fieldLabel: '竞价方式',
				emptyText: '必选',
				labelWidth: 200,
				labelAlign: 'right',

				queryMode: 'local',
				valueField: 'code',
				displayField: 'name',
				store: Ext.create('Ext.data.Store', {
					fields: ['code', 'name'],
					data: [
						{ 'code': 1, 'name': '有效' },
						{ 'code': 0, 'name': '无效' }
					]
				}),

				editable: false,
				forceSelection: true,
				allowBlank: true,
				beforeLabelTextTpl: '<span style="color:red;font-weight:bold">*</span>',

			}, {
				columnWidth: 0.5,
				margin: 6,

				xtype: 'combobox',

				name: 'type',

				fieldLabel: '业务分类',
				emptyText: '必选',
				labelWidth: 200,
				labelAlign: 'right',

				queryMode: 'local',
				valueField: 'code',
				displayField: 'name',
				store: Ext.create('Ext.data.Store', {
					fields: ['code', 'name'],
					data: [
						{ 'code': 1, 'name': '有效' },
						{ 'code': 0, 'name': '无效' }
					]
				}),

				editable: false,
				forceSelection: true,
				allowBlank: true,
				beforeLabelTextTpl: '<span style="color:red;font-weight:bold">*</span>',

			}, {
				columnWidth: 0.5,
				margin: 6,

				xtype: 'textfield',

				name: 'tissue',

				fieldLabel: '估算价(万元)',
				emptyText: '必填',
				labelWidth: 200,
				labelAlign: 'right',

				allowBlank: false
			}, {
				columnWidth: 0.5,
				margin: 6,

				xtype: 'combobox',

				name: 'executor',

				fieldLabel: '采购执行人',
				emptyText: '必选',
				labelWidth: 200,
				labelAlign: 'right',

				queryMode: 'local',
				valueField: 'code',
				displayField: 'name',
				store: Ext.create('Ext.data.Store', {
					fields: ['code', 'name'],
					data: [
						{ 'code': 1, 'name': '有效' },
						{ 'code': 0, 'name': '无效' }
					]
				}),

				editable: false,
				forceSelection: true,
				allowBlank: true,
				beforeLabelTextTpl: '<span style="color:red;font-weight:bold">*</span>',
			}, {
				columnWidth: 0.5,
				margin: 6,

				xtype: 'combobox',

				name: 'executor',

				fieldLabel: '要求税率',
				emptyText: '必选',
				labelWidth: 200,
				labelAlign: 'right',

				queryMode: 'local',
				valueField: 'code',
				displayField: 'name',
				store: Ext.create('Ext.data.Store', {
					fields: ['code', 'name'],
					data: [
						{ 'code': 1, 'name': '有效' },
						{ 'code': 0, 'name': '无效' }
					]
				}),

				editable: false,
				forceSelection: true,
				allowBlank: true,
				beforeLabelTextTpl: '<span style="color:red;font-weight:bold">*</span>',
			}, {
				columnWidth: 0.5,
				margin: 6,

				xtype: 'combobox',

				name: 'executor',

				fieldLabel: '竞价类型',
				emptyText: '必选',
				labelWidth: 200,
				labelAlign: 'right',

				queryMode: 'local',
				valueField: 'code',
				displayField: 'name',
				store: Ext.create('Ext.data.Store', {
					fields: ['code', 'name'],
					data: [
						{ 'code': 1, 'name': '有效' },
						{ 'code': 0, 'name': '无效' }
					]
				}),

				editable: false,
				forceSelection: true,
				allowBlank: true,
				beforeLabelTextTpl: '<span style="color:red;font-weight:bold">*</span>',
			}, {
				columnWidth: 0.5,
				margin: 6,

				xtype: 'combobox',

				name: 'executor',

				fieldLabel: '竞价方式',
				emptyText: '必选',
				labelWidth: 200,
				labelAlign: 'right',

				queryMode: 'local',
				valueField: 'code',
				displayField: 'name',
				store: Ext.create('Ext.data.Store', {
					fields: ['code', 'name'],
					data: [
						{ 'code': 1, 'name': '有效' },
						{ 'code': 0, 'name': '无效' }
					]
				}),

				editable: false,
				forceSelection: true,
				allowBlank: true,
				beforeLabelTextTpl: '<span style="color:red;font-weight:bold">*</span>',
			}, {
				columnWidth: 0.5,
				margin: 6,

				xtype: 'textfield',

				name: 'tissue',

				fieldLabel: '竞价截止时间(竞价开启后(分))',
				emptyText: '必填',
				labelWidth: 200,
				labelAlign: 'right',
				beforeLabelTextTpl: '<span style="color:red;font-weight:bold">*</span>',

				allowBlank: false
			}, {
				xtype: 'datetimefield',
				columnWidth: 0.50,
				labelWidth: 200,
				margin: 6,
				maxValue: Ext.Date.add(new Date(), Ext.Date.DAY, 1),
				fieldLabel: '报名截止启时间',
				hourText: '小时',
				minuteText: '分钟',
				submitFormat: 'Y-m-d H:i:s',
				format: 'Y-m-d H:i:s',
				beforeLabelTextTpl: '<font color=red>*</font>',
				labelSeparator: '：',
				labelAlign: 'right',
				name: 'maintain_date_start',
				value: new Date(),
				allowBlank: true,
				editable: false
			}, {
				columnWidth: 0.5,
				margin: 6,

				xtype: 'textfield',

				name: 'tissue',

				fieldLabel: '起拍价（元）',
				emptyText: '必填',
				labelWidth: 200,
				labelAlign: 'right',
				beforeLabelTextTpl: '<span style="color:red;font-weight:bold">*</span>',
				allowBlank: false
			}, {
				columnWidth: 0.5,
				margin: 6,

				xtype: 'textfield',

				name: 'tissue',

				fieldLabel: '价格梯度（元）',
				emptyText: '必填',
				labelWidth: 200,
				labelAlign: 'right',
				beforeLabelTextTpl: '<span style="color:red;font-weight:bold">*</span>',
				allowBlank: false
			}, {
				columnWidth: 0.5,
				margin: 6,

				xtype: 'combobox',

				name: 'executor',

				fieldLabel: '是否可查看排名',
				emptyText: '必选',
				labelWidth: 200,
				labelAlign: 'right',

				queryMode: 'local',
				valueField: 'code',
				displayField: 'name',
				store: Ext.create('Ext.data.Store', {
					fields: ['code', 'name'],
					data: [
						{ 'code': 1, 'name': '有效' },
						{ 'code': 0, 'name': '无效' }
					]
				}),

				editable: false,
				forceSelection: true,
				allowBlank: true,
				beforeLabelTextTpl: '<span style="color:red;font-weight:bold">*</span>',
			}, {
				columnWidth: 0.5,
				margin: 6,

				xtype: 'combobox',

				name: 'executor',

				fieldLabel: '是否可查看最低/高价',
				emptyText: '必选',
				labelWidth: 200,
				labelAlign: 'right',

				queryMode: 'local',
				valueField: 'code',
				displayField: 'name',
				store: Ext.create('Ext.data.Store', {
					fields: ['code', 'name'],
					data: [
						{ 'code': 1, 'name': '有效' },
						{ 'code': 0, 'name': '无效' }
					]
				}),

				editable: false,
				forceSelection: true,
				allowBlank: true,
				beforeLabelTextTpl: '<span style="color:red;font-weight:bold">*</span>',
			}, {
				xtype: 'textarea',
				height: 80,
				labelWidth: 200,
				name: 'err_text',
				afterLabelTextTpl: '<font color=red>&nbsp;&nbsp;</font>',
				labelSeparator: '：',
				labelAlign: 'right',
				fieldLabel: '备注',
				columnWidth: 1.00,
			}]
		}]
	}, {
		xtype: 'fieldset',
		title: '物料信息',
		collapsible: true,
		items: [{
			xtype: 'grid',
			height: 140,
			columns: [
				{ xtype: 'gridcolumnview', text: '序号', dataIndex: 'id', width: 50 },
				{ xtype: 'gridcolumnview', text: '物料编码', dataIndex: 'num', width: 100 },
				{ xtype: 'gridcolumnview', text: '物料名称', dataIndex: 'name', width: 100 },
				{ xtype: 'gridcolumnview', text: '规格型号', dataIndex: 'people', width: 100 },
				{ xtype: 'gridcolumnview', text: '图号', dataIndex: 'fang', width: 100 },
				{ xtype: 'gridcolumnview', text: '材质', dataIndex: 'create_time', width: 100 },
				{ xtype: 'gridcolumnview', text: '产地品牌', dataIndex: 'count', width: 100 },
				{ xtype: 'gridcolumnview', text: '计量单位', dataIndex: 'create_time', width: 100 },
				{ xtype: 'gridcolumnview', text: '数量', dataIndex: 'num', width: 100 },
				{ xtype: 'gridcolumnview', text: '估算单价（元）', dataIndex: 'name', width: 100 },
				{ xtype: 'gridcolumnview', text: '估算金额（元）', dataIndex: 'people', width: 100 },
				{ xtype: 'gridcolumnview', text: '需求日期', dataIndex: 'fang', width: 100 },
				{ xtype: 'gridcolumnview', text: '需求单位/部门', dataIndex: 'create_time', width: 100 },
				{ xtype: 'gridcolumnview', text: '交货地点', dataIndex: 'count', width: 100 },
				{ xtype: 'gridcolumnview', text: '备注', dataIndex: 'create_time', width: 100 },
				{ xtype: 'gridcolumnview', text: '采购需求', dataIndex: 'count', width: 100 }
			]
		}]

	}],

	//

	buttonAlign: 'center'
});